package com.smart.business.dao;

import com.smart.entity.system.DictEntity;
import com.smart.mybatis.dao.BaseDao;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface LocalDictDao extends BaseDao<DictEntity> {

    List<DictEntity> getBottomLevelPoints(String secondLastLevelId);

    List<DictEntity> getCurrentDict(@Param("companyIds") String companyIds);

    List<DictEntity> getProtocol();

    String getDictCode(@Param("pointId") String pointId);

    String getCompanyDictCode(@Param("companyName") String companyName);
    @Select("update sys_dict set is_deleted = #{isDisable} where id = #{pointId}")
    void updateDictIsDisable(@Param("pointId") String pointId, @Param("isDisable") int isDisable);

    String getTableNameByPointId(@Param("pointId") String pointId);
    @Select("select dict_name from sys_dict where dict_code = #{companyType}")
    String getCompanyName(String companyType);


}
